package com.iretailer.report.dto;

import com.alibaba.fastjson.annotation.JSONField;

import java.text.MessageFormat;

/**
 * @Auther xjw
 * @Date 2019/1/21 1021
 * @Description
 */
public class PhysicalCameraZone {

    public PhysicalCameraZone() {
    }

    public PhysicalCameraZone(Long id, Long physicalZonesId, Integer reverse) {
        this.id = id;
        this.physicalZonesId = physicalZonesId;
        this.reverse = reverse;
    }

    public PhysicalCameraZone(Long id, Long camerazoneId, Long physicalZonesId, Integer reverse) {
        this.id = id;
        this.camerazoneId = camerazoneId;
        this.physicalZonesId = physicalZonesId;
        this.reverse = reverse;
    }

    @JSONField(name = "Id")
    private Long id;

    @JSONField(name = "CamerazoneId")
    private Long camerazoneId;

    @JSONField(name = "PhysicalZonesId")
    private Long physicalZonesId;

    @JSONField(name = "Reverse")
    private Integer reverse;

    private String ph_cz;

    public String getPh_cz() {
        if (this.physicalZonesId != null && this.camerazoneId != null) {

            return MessageFormat.format("{0}_{1}", this.physicalZonesId, this.camerazoneId);
        } else {
            return null;
        }
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCamerazoneId() {
        return camerazoneId;
    }

    public void setCamerazoneId(Long camerazoneId) {
        this.camerazoneId = camerazoneId;
    }

    public Long getPhysicalZonesId() {
        return physicalZonesId;
    }

    public void setPhysicalZonesId(Long physicalZonesId) {
        this.physicalZonesId = physicalZonesId;
    }

    public Integer getReverse() {
        return reverse;
    }

    public void setReverse(Integer reverse) {
        this.reverse = reverse;
    }

    public void setPh_cz(String ph_cz) {
        this.ph_cz = ph_cz;
    }
}
